package org.jeecg.modules.sggg.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.sggg.entity.SgMember;

import java.util.List;
import java.util.Map;

/**
 * @Description: 居民表
 * @Author: jeecg-boot
 * @Date: 2022-10-17
 * @Version: V1.0
 */
public interface ISgMemberService extends IService<SgMember> {

    SgMember queryByPhone(String phone);

    List<Map<String, Object>> querydoctorNum(String orgCode);

    List<Map<String, Object>> interveneListByMid(String memberId, Integer type);

    Integer getincreaseCount(String orgCode, String id);

    /**
     * @return java.util.List<org.jeecg.modules.sggg.entity.SgMember>
     * @Description 获取今日新增的居民信息
     * @Author 穆雄雄
     * @Date: 2023/4/7 上午 8:46
     * 博客：https://blog.csdn.net/qq_34137397
     * 个人站：https://www.穆雄雄.com
     * 个人站：https://www.muxiongxiong.cn
     * 个人站：https://88688.team
     * @Param [orgCode, roleCode, doctorId, userId]
     **/
    List<SgMember> getAddMemberByToday(String orgCode, String roleCode, String doctorId, String date, List<String> responsibleAgencies);

    Boolean updateCurrencyById(String memberId, Integer currency);

    IPage<SgMember> memberCurrencyRanking(IPage<SgMember> page, SgMember sgMember, String roleCode, String orgCode, String userId);

    List<Map<String, Object>> getThreeHighDiseaseTrend(String region);

    List<Map<String, Object>> getHighRiskWarning(String departCode);

    Boolean deleteByIds(String ids);

    /**
     * 云雀居民建档
     *
     * @param orgCode 机构编码
     * @param profile 用户信息
     * @return
     */
    Boolean saveMemberYQ(String orgCode, JSONObject profile);
}
